package hy.confiig;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
@MapperScan("hy.dao")//用来告诉mapper文件，生成的类要实现哪些接口
public class MvcConfig implements WebMvcConfigurer {
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/showRegist").setViewName("regist");
        registry.addViewController("/showLogin").setViewName("login");
        registry.addViewController("/showSuccess").setViewName("success");
        registry.addViewController("/showError").setViewName("error");
    }
}